class Solution:
    def findContentChildren(self, g: List[int], s: List[int]) -> int:
        g.sort(reverse=True)
        s.sort(reverse=True)
        ans = j = 0
        for i, x in enumerate(g):
            if j == len(s): break
            if x <= s[j]:
                ans += 1
                j += 1
        return ans